package com.baizhi.cmfz.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 上师
 *
 * @author zhanglh
 * @date 2019/09/11
 */

@AllArgsConstructor
@NoArgsConstructor
public class Guru implements Serializable {

    /**
     * 上师id
     */
    @Excel(name = "上师编号")
    private Integer guruId;

    /**
     * 上师姓名
     */
    @Excel(name = "上师姓名")
    private String guruName;

    /**
     * 上师头像
     */
    @Excel(name = "上师头像", type = 2, width = 20, height = 20, savePath = "src/img/test")
    private String guruImage;

    /**
     * 上师法号
     */
    @Excel(name = "上师法号")
    private String guruNickname;

    /**
     * 上师状态 0正常 1冻结 冻结的同时需要下架相关的专辑和文章
     */
    @Excel(name = "上师状态", replace = {"正常_0", "冻结_1"})
    private int guruStatus;

    private static final long serialVersionUID = 5967295298689462090L;

    public Integer getGuruId() {return this.guruId;}

    public String getGuruName() {return this.guruName;}

    public String getGuruImage() {return this.guruImage;}

    public String getGuruNickname() {return this.guruNickname;}

    public int getGuruStatus() {return this.guruStatus;}

    public void setGuruId(Integer guruId) {this.guruId = guruId; }

    public void setGuruName(String guruName) {this.guruName = guruName; }

    public void setGuruImage(String guruImage) {this.guruImage = guruImage; }

    public void setGuruNickname(String guruNickname) {this.guruNickname = guruNickname; }

    public void setGuruStatus(int guruStatus) {this.guruStatus = guruStatus; }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof Guru)) return false;
        final Guru other = (Guru) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$guruId = this.getGuruId();
        final Object other$guruId = other.getGuruId();
        if (this$guruId == null ? other$guruId != null : !this$guruId.equals(other$guruId)) return false;
        final Object this$guruName = this.getGuruName();
        final Object other$guruName = other.getGuruName();
        if (this$guruName == null ? other$guruName != null : !this$guruName.equals(other$guruName)) return false;
        final Object this$guruImage = this.getGuruImage();
        final Object other$guruImage = other.getGuruImage();
        if (this$guruImage == null ? other$guruImage != null : !this$guruImage.equals(other$guruImage)) return false;
        final Object this$guruNickname = this.getGuruNickname();
        final Object other$guruNickname = other.getGuruNickname();
        if (this$guruNickname == null ? other$guruNickname != null : !this$guruNickname.equals(other$guruNickname))
            return false;
        if (this.getGuruStatus() != other.getGuruStatus()) return false;
        return true;
    }

    protected boolean canEqual(final Object other) {return other instanceof Guru;}

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $guruId = this.getGuruId();
        result = result * PRIME + ($guruId == null ? 43 : $guruId.hashCode());
        final Object $guruName = this.getGuruName();
        result = result * PRIME + ($guruName == null ? 43 : $guruName.hashCode());
        final Object $guruImage = this.getGuruImage();
        result = result * PRIME + ($guruImage == null ? 43 : $guruImage.hashCode());
        final Object $guruNickname = this.getGuruNickname();
        result = result * PRIME + ($guruNickname == null ? 43 : $guruNickname.hashCode());
        result = result * PRIME + this.getGuruStatus();
        return result;
    }

    public String toString() {return "Guru(guruId=" + this.getGuruId() + ", guruName=" + this.getGuruName() + ", " +
            "guruImage=" + this.getGuruImage() + ", guruNickname=" + this.getGuruNickname() + ", guruStatus=" + this.getGuruStatus() + ")";}
}